<?php
namespace app\index\controller;
use think\Db;
class Intro extends Base{
    public function intro(){
    	$intro_banner=Db::name('intro_banner')->where('id',1)->find();
        $express=Db::name('express_style')->order('id asc')->select();
        $introduce=Db::name('introduce')->where('id',1)->find();
        $introduce['intro_item']=json_decode($introduce['intro_item']);
        $this->assign('system_set',$this->system_set());
		$this->assign('intro_banner',$intro_banner);
        $this->assign('express',$express);
        $this->assign('introduce',$introduce);
        return $this->fetch();
    }
    public function culture(){
        $intro_banner=Db::name('intro_banner')->where('id',1)->find();
        $express=Db::name('express_style')->order('id asc')->select();
        $culture_l=Db::name('culture_l')->where('id',1)->find();
        $culture=Db::name('culture')->order('id asc')->select();
        $this->assign('system_set',$this->system_set());
        $this->assign('intro_banner',$intro_banner);
        $this->assign('express',$express);
        $this->assign('culture_l',$culture_l);
        $this->assign('culture',$culture);
        return $this->fetch();
    }
    public function event(){
        $intro_banner=Db::name('intro_banner')->where('id',1)->find();
        $express=Db::name('express_style')->order('id asc')->select();
        $biglog_l=Db::name('biglog_l')->where('id',1)->find();
        $biglog=Db::name('biglog_year')->where('state',1)->order('id desc')->select();
        foreach ($biglog as $k => $value) {
            $biglog[$k]['biglog']=Db::name('biglog')->where('state',1)->where('year_id',$biglog[$k]['id'])->order('id desc')->select();
        }
        $this->assign('system_set',$this->system_set());
        $this->assign('intro_banner',$intro_banner);
        $this->assign('express',$express);
        $this->assign('biglog_l',$biglog_l);
        $this->assign('biglog',$biglog);
        return $this->fetch();
    }
    public function honour(){
        $intro_banner=Db::name('intro_banner')->where('id',1)->find();
        $express=Db::name('express_style')->order('id asc')->select();
        $honour=Db::name('honour')->where('state',1)->order('sort desc')->select();
        $this->assign('system_set',$this->system_set());
        $this->assign('intro_banner',$intro_banner);
        $this->assign('express',$express);
        $this->assign('honour',$honour);
        return $this->fetch();
    }
    public function partner(){
        $intro_banner=Db::name('intro_banner')->where('id',1)->find();
        $express=Db::name('express_style')->order('id asc')->select();
        $partner_title=Db::name('partner_title')->where('id',1)->find();
        $partner=Db::name('partner')->where('state',1)->order('sort desc')->select();
        $this->assign('system_set',$this->system_set());
        $this->assign('intro_banner',$intro_banner);
        $this->assign('express',$express);
        $this->assign('partner_title',$partner_title);
        $this->assign('partner',$partner);
        return $this->fetch();
    }
}
